using System;
using System.Collections.Generic;
using System.Text;
using Tao.OpenGl;
using System.Drawing;

namespace tp3
{
    public class Carrito
    {
        public static void Dibujar()
        {
            Gl.glEnable(Gl.GL_LIGHTING);

            float[] materialColor = ColorTP.FColor(Color.Navy);
            float[] materialSpecular = { 0.9f, 0.9f, 0.9f, 0.9f };
            float[] materialEmission = { 0.05f, 0.05f, 0.05f, 1.0f };

            Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_AMBIENT_AND_DIFFUSE, materialColor);
            Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_SPECULAR, materialSpecular);
            Gl.glMaterialfv(Gl.GL_FRONT_AND_BACK, Gl.GL_EMISSION, materialEmission);
            Gl.glMaterialf(Gl.GL_FRONT_AND_BACK, Gl.GL_SHININESS, 10);


            Gl.glBegin(Gl.GL_QUADS);

            Gl.glNormal3f(0, 1, 0);
            Gl.glVertex3f(-0.25f, 0.25f, 1);
            Gl.glVertex3f(0.25f, 0.25f, 1);
            Gl.glVertex3f(0.25f, 0.25f, 0);
            Gl.glVertex3f(-0.25f, 0.25f, 0);


            Gl.glNormal3f(1, 0, 0);
            Gl.glVertex3f(0.25f, 0.25f, 1);
            Gl.glVertex3f(0.25f, -0.25f, 1);
            Gl.glVertex3f(0.25f, -0.25f, 0);
            Gl.glVertex3f(0.25f, 0.25f, 0);

            Gl.glNormal3f(0, -1, 0);
            Gl.glVertex3f(0.25f, -0.25f, 1);
            Gl.glVertex3f(-0.25f, -0.25f, 1);
            Gl.glVertex3f(-0.25f, -0.25f, 0);
            Gl.glVertex3f(0.25f, -0.25f, 0);

            Gl.glNormal3f(-1, 0, 0);
            Gl.glVertex3f(-0.25f, -0.25f, 1);
            Gl.glVertex3f(-0.25f, 0.25f, 1);
            Gl.glVertex3f(-0.25f, 0.25f, 0);
            Gl.glVertex3f(-0.25f, -0.25f, 0);

            Gl.glNormal3f(0, 0, 1);
            Gl.glVertex3f(-0.25f, 0.25f, 1);
            Gl.glVertex3f(-0.25f, -0.25f, 1);
            Gl.glVertex3f(0.25f, -0.25f, 1);
            Gl.glVertex3f(0.25f, 0.25f, 1);

            Gl.glNormal3f(0, 0, -1);
            Gl.glVertex3f(-0.25f, 0.25f, 0);
            Gl.glVertex3f(-0.25f, -0.25f, 0);
            Gl.glVertex3f(0.25f, -0.25f, 0);
            Gl.glVertex3f(0.25f, 0.25f, 0);

            Gl.glEnd();

        }
    }
}
